package ObserverMod;

import ObserverMod.code.CharShower;
import ObserverMod.code.TextEditor;
import ObserverMod.code.WordFrequencyShower;
import ObserverMod.code.WordListShower;

// 客户端类
public class Client {

    public static void main(String[] args) {
        code code = new code();
       TextEditor textEditor = code.new TextEditor();
        CharShower charShower = code.new CharShower();
        WordListShower wordListShower = code.new WordListShower();
        WordFrequencyShower wordFrequencyShower = code.new WordFrequencyShower();

        textEditor.addShower(charShower);
        textEditor.addShower(wordListShower);
        textEditor.addShower(wordFrequencyShower);

        //textEditor.setText(List.of("hello world", "hello moonshot", "hello universe"));
    }
}